package com.demo.observer.ob_02.event;

import java.util.Date;

/**
 * @Author: shubin_yao
 * @Date: 2022/06/04/15:00
 * @Description: 观察者模式下
 */
public class LotteryServiceImpl implements LotteryService {

    MinibusTargetService targetService = new MinibusTargetService();

    @Override
    public LotteryResult doDraw(String uId) {
        //摇号
        String lottery = targetService.lottery(uId);
        LotteryResult lotteryResult = new LotteryResult(uId, lottery, new Date());
        return lotteryResult;
    }
}
